#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;

#include"BSearchTree.h"

void test1()
{
	ZMH::BSTree<int> tree;

	tree.Insert(8);
	tree.Insert(5);
	tree.Insert(4);
	tree.Insert(16);
	tree.Insert(17);

	tree.InorderTraverse();

	cout << endl;
	cout << tree.Find(16) << endl;
	cout << tree.Find(3) << endl;
	cout << tree.Find(17) << endl;
}

void test2()
{
	ZMH::BSTree<int> tree;

	tree.Insert(8);
	tree.Insert(5);
	tree.Insert(4);
	tree.InorderTraverse();

	tree.Emrase(8);
	tree.InorderTraverse();

	tree.Emrase(5);
	tree.InorderTraverse();

	tree.Emrase(4);
	tree.InorderTraverse();
}

void test3()
{
	ZMH::BSTree<int> tree;
	tree.Insert(8);
	tree.Insert(5);
	tree.Insert(4);

	ZMH::BSTree<int> tree1;
	tree1 = tree = tree;
	tree1.InorderTraverse();
}

int main()
{
	test3();
	return 0;
}
